Crate capture_it

source ·
Expand description

Modern C++-ish closure macros.

This crate provides the capture macro, which implements C++11’s lambda-style capture functionality. It uses only a list of AST-parsable tokens, so it can be automatically formatted by rustfmt.

most of macro expressions are inspired* from the crate oliver-giersch/closure

Modules

Macros

  • Generate a closure that captures specified variables, and captures all other unspecified variables by move.